﻿<UserControl x:Class="redditMetro.Controls.AccountSettingsPanel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Loaded="UserControl_Loaded"
    d:DesignHeight="1080" d:DesignWidth="346">

    <Grid x:Name="LayoutRoot" Background="#9BBBDB" Width="346">
        <StackPanel Orientation="Vertical" Margin="20">
            <TextBlock FontSize="24" FontFamily="Segoe UI" Text="Account Settings" />
            <StackPanel Orientation="Horizontal" Margin="0, 15, 0, 15">
                <Border Background="#CEE3F8" Width="75" Height="75">
                    <Image Source="Images/logo.56x56.png" Height="56" Width="56" />
                </Border>
                <StackPanel Orientation="Vertical" Margin="10,0,0,0">
                    <TextBlock FontSize="16" FontFamily="Segoe UI" Text="reddit metro" />
                    <TextBlock FontSize="10" FontFamily="Segoe UI" Text="a open source project" />
                </StackPanel>
            </StackPanel>
            <TextBlock FontSize="18" FontFamily="Segoe UI" Text="Username" />
            <TextBox x:Name="txtUsername" Margin="0, 0, 80, 0" Text="{Binding UserName}" LostFocus="txtUsername_LostFocus" />
            <TextBlock FontSize="18" FontFamily="Segoe UI" Text="Password" Margin="0,20,0,0" />
            <PasswordBox x:Name="txtPassword" Margin="0,0,80,0" Password="{Binding Password}" LostFocus="txtPassword_LostFocus" KeyUp="txtPassword_KeyUp" />
            <StackPanel Orientation="Horizontal" Margin="0,15,0,0">
                <TextBlock FontSize="18" FontFamily="Segoe UI" Margin="0,5,0,0" Text="Save My Password" />
                <ToggleSwitch x:Name="tglSavePassword" IsOn="{Binding SavePassword}" Width="120" LostFocus="tglSavePassword_LostFocus" Toggled="tglSavePassword_Toggled" />
            </StackPanel>
            <TextBlock FontSize="18" FontFamily="Segoe UI" Text="{Binding ErrorMessage}" />
        </StackPanel>
    </Grid>
</UserControl>